package com.zxy.study.ui.activity;

import android.os.Bundle;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.zxy.study.R;
import com.zxy.study.utils.Utils;
import com.zxy.study.adapter.TextAdapter;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CollapsingToolbarActivity extends AppCompatActivity {

	@BindView(R.id.app_bar)
	AppBarLayout mAppBarLayout;
	@BindView(R.id.collaps_toolbar)
	CollapsingToolbarLayout mCollapsingToolbarLayout;
	@BindView(R.id.recyclerview)
	RecyclerView mRecyclerView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_collapsing_toolbar);
		ButterKnife.bind(this);

		initView();
	}

	private void initView() {
		mRecyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
		TextAdapter adapter = new TextAdapter(Utils.getTestData("风景名胜"));
		mRecyclerView.setAdapter(adapter);
	}
}
